import Vue from 'vue'
import VueRouter from 'vue-router'
// 管理页面
import Manager from '../views/manager/Index'
import Home from '../views/manager/Home'
import Add from '../views/manager/Add'

Vue.use(VueRouter)

const routes = [
  {
    path: "/",
    redirect: "/manager/home"
  },
  {
    path: '/manager',
    name: 'manager',
    component: Manager,
    children: [
      {
        path: 'home',
        component: Home,
      },
      {
        path: 'word',
        component: Add
      }
    ]
  }
]

const router = new VueRouter({
  // mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
